<template>
	<view class="container">
		<shopItem :shopList="shopList"></shopItem>
	</view>

</template>

<script>
	import shopItem from "@/components/goods-item/index.vue"
	import {
		getClassDetailApi
	} from '@/api/index.js'
	export default {
		components: {
			shopItem
		},
		data() {
			return {
				shopList: ['2', '3', '65']
			}
		},
		onLoad(options) {
			console.log(options);
			if (options.class) {
				this.getClassDetail(options.class)
			}

		},
		computed: {


		},
		methods: {
			async getClassDetail(e) {
				const {
					data: res
				} = await getClassDetailApi({
					page: this.page,
					class: e
				})
				console.log(res);
				this.shopList = res.Business;
			},


		}
	}
</script>

<style lang="scss">
	.container {
		width: 95%;
		margin: 0 auto;
	}
</style>